home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: oker.escape.de!lst!lst
- From: lst@lst.escape.de (Lutz Stohlmann)
- Subject: GNU gcc 2.7.2 problem on Intel...
- X-Newsreader: TIN [version 1.2 PL2]
- Organization: private site lst/bs
- Message-ID: <Do3oqx.Fss@lst.escape.de>
- Date: Mon, 11 Mar 1996 11:18:32 GMT
-
- Hi all,
-
- yes, I know, it's a little off-topic and might fit better
- in comp.os.linux.* or the like, but as I do not get these
- groups I just ask here, so please don't flame:
-
- gcc 2.7.2 on i486-linux (1.2.13) problem:
- -----------------------------------------
-
- I compiled gcc-2.7.2, and with many things I compiled it works.
- But when I try to compile the Linux kernel, the compiler cannot
- compile the following part of code, esp. the outb inlines:
-
- -----------------<SNIP>-----------------------------
- extern inline void __outb_p (unsigned char value, unsigned short port)
- { __asm__ __volatile__ ("out" "b" " %" "b" "0,%" "w" "1" : : "a" (value), "d" (port));
- __asm__ __volatile__("outb %al,$0x80") ; }
-
- extern inline void __outbc_p (unsigned char value, unsigned short port)
- { __asm__ __volatile__ ("out" "b" " %" "b" "0,%" "" "1" : : "a" (value), "i" (port));
- __asm__ __volatile__("outb %al,$0x80") ; }
-
- static char fpu_error = 0;
-
- static void copro_timeout(void)
- {
- fpu_error = 1;
- timer_table[21 ].expires = jiffies+100;
- timer_active |= 1<< 21 ;
- printk("387 failed: trying to reset\n");
- send_sig(8 , last_task_used_math, 1);
- ((__builtin_constant_p(( 0xf1 )) && ( 0xf1 ) < 256) ? __outbc_p(( 0 ),(
- 0xf1 )) : __outb_p(( 0 ),( 0xf1 ))) ;
- ((__builtin_constant_p(( 0xf0 )) && ( 0xf0 ) < 256) ? __outbc_p(( 0 ),(
- 0xf0 )) : __outb_p(( 0 ),( 0xf0 ))) ;
- }
- -----------------<SNIP>-----------------------------
-
- As __outb_p and __outbc_p are made from very ugly #define
- macros, I first thought of a cpp problem. But the cpp output
- of gcc-2.7.0 and gcc-2.7.2 is exactly the same (but the includes,
- of course).
-
- Now these are the errors I get:
-
- -----------------<SNIP>-----------------------------
- /usr/src/linux/include/asm/io.h: In function `copro_timeout':
- /usr/src/linux/include/asm/io.h:82: inconsistent operand constraints in an `asm'
- /usr/src/linux/include/asm/io.h:82: inconsistent operand constraints in an `asm'
- /usr/src/linux/include/asm/io.h:82: inconsistent operand constraints in an `asm'
- /usr/src/linux/include/asm/io.h:82: inconsistent operand constraints in an `asm'
- ...
- make: *** [init/main.o] Error
- -----------------<SNIP>-----------------------------
-
- "inconsistent operand contraints in an `asm'".
- Ah. Obviously, gcc-2.7.2 doesn't like bytes in outs anymore...
-
- gcc on Linux-ELF uses the AT&T assembler syntax, AFAIK.
- In that file, every type of a mnemonic like word or double
- is defined, but not byte. This is said to be defined in
- svr3.h or svr4.h
-
- In the Changelog I found:
-
- -----------------<SNIP>-----------------------------
- Fri Sep 22 18:27:33 1995 Torbjorn Granlund <tege@matematik.su.se>
-
- * i386.h (CONST_OK_FOR_LETTER_P): Make `N' match range 0..255
- for `outb' instruction.
- -----------------<SNIP>-----------------------------
-
- Maybe this is the thing which broke outb, as all other out%type%s work?
- I think I didn't find differences in the svr4/svr3 files which could
- cause this.
- Or did the configure command maybe forgot to -Define anything, which
- isn't included now and therefore breaks the outb mnemonic?
-
- Please reply via email,
- thanx in advance for your help.
- --
- Ciao, Lutz '' live
- '|| ||` `||''|, || \\ // free
- lst@lst.escape.de || || || || || >< or
- T:+491772408889 `|..'|. .|| ||. .||. // \\ die!
-